<?php

namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use EloquentFilter\Filterable;
use App\Models\Traits\Admin\ActionButtonTrait;
use Illuminate\Support\Facades\Storage;

class Shipment extends Model
{
    use Filterable, ActionButtonTrait;

    protected $append = ['actionButton'];
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $actions = ['edit','delete'];
    protected $actionUri = 'replenishment';

    protected $fillable = [
        'operationame', 'machines_name', 'machines_imel', 'aisle_number','order_number','shipment_status','shipment_info'
    ];
    //
    public function machine()
    {
        return $this->belongsTo(Machine::class, 'couter_id', 'id');
    }

    public function merchant()
    {
        return $this->belongsTo(Merchant::class, 'merchant_id', 'id');
    }

    public function orders()
    {
        return $this->belongsTo(Merchant::class, 'morder_id	', 'id');
    }
}
